home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(Key.isDown(39))
- {
- this._x += moveSpeed;
- this.gotoAndPlay("right");
- }
- else if(Key.isDown(38))
- {
- this._y -= moveSpeed;
- this.gotoAndPlay("up");
- }
- else if(Key.isDown(40))
- {
- this._y += moveSpeed;
- this.gotoAndPlay("down");
- }
- else if(Key.isDown(37))
- {
- this._x -= moveSpeed;
- this.gotoAndPlay("left");
- }
- if(this.hitTest(_root.hole) && keyK == 2)
- {
- this.gotoAndStop("yeah");
- stopAllSounds();
- _root.gotoAndPlay("star");
- }
- if(this.hitTest(_root.out))
- {
- this._y -= moveSpeed;
- }
- if(this.hitTest(_root.key))
- {
- keyK = 2;
- _root.key.gotoAndStop(2);
- }
- }
-